//
//  DKAuthorityHelper.h
//  DanKU
//
//  Created by 吴斌 on 2023/12/5.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, DKAuthorizationStatus) {
    DKAuthorizationStatusAuthorized,        // 已授权
    DKAuthorizationStatusDenied,            // 拒绝
    DKAuthorizationStatusRestricted,        // 应用没有相关权限，且当前用户无法改变这个权限，比如:家长控制
    DKAuthorizationStatusNotSupport         // 硬件等不支持
};
@interface DKAuthorityHelper : NSObject
+(DKAuthorityHelper*)defaultManager;
//照相机权限
+ (void)requestCameraAuthorization:(void(^)(DKAuthorizationStatus status))callback;
//通讯录权限
+ (void)requestAddressBookAuthorization:(void(^)(DKAuthorizationStatus status))callback;
//定位权限
+ (void)requestLocationAuthorization:(BOOL)isUpload withAuthorization:(void(^)(DKAuthorizationStatus status))callback;
//日历权限
+ (void)requestEventAuthorization:(void(^)(DKAuthorizationStatus status))callback;
@end

NS_ASSUME_NONNULL_END
